package com.rockcent.service;

import com.rockcent.common.common.PageResult;
import com.rockcent.mall.lib.domain.MallMember;
import com.rockcent.mall.lib.domain.enumclass.MallMemberFundTransactionType;
import com.rockcent.mall.lib.dto.MallMemberDto;

import java.math.BigDecimal;

/**
 * Created by zhangjh on 2017/3/8.
 */
public interface MallMemberSrv {

    /**
     *
     * @param rechargeAmount
     * @param mallMemberId
     * @param outlineRecharge
     * @param seqNo
     */
    //改变平台会员资金流水
    void changeMallMemberFund(BigDecimal rechargeAmount, Long mallMemberId, MallMemberFundTransactionType outlineRecharge, String seqNo);

    /**
     *
     * @param mallId
     * @return
     */
    MallMember findTop1ByMallId(Long mallId);

    /**
     *
     * @param mallId
     * @return
     */
    MallMember findTop1ByMallIdByLastUpdatedDesc(Long mallId);

    /**
     *
     * @param mallMember
     * @return
     */
    MallMember save(MallMember mallMember);

    /**
     *
     * @param dto
     * @param page
     * @return
     */
    PageResult<MallMemberDto> findMallMemberPage(MallMemberDto dto, PageResult page);

    /**
     *
     * @param mallMemberId
     * @return
     */
    MallMember findOneById(Long mallMemberId);
}
